package com.atguigu.gulimall.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("gulimall-product")
public interface ProductFeignService {

    /**
     * 请求方式
     * 1 @FeignClient("gulimall-product") + @RequestMapping("/product/skuinfo/info/{skuId}")
     *      直接给gulimall-product 服务发送请求
     * 2 @FeignClient("gulimall-gateway") + @RequestMapping("/api/product/skuinfo/info/{skuId}")
     *      给网关发送请求
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    //@RequiresPermissions("product:skuinfo:info")
    public R info(@PathVariable("skuId") Long skuId);
}
